package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CoffeeWarehouseMapper;
import com.ruoyi.system.domain.CoffeeWarehouse;
import com.ruoyi.system.service.ICoffeeWarehouseService;

/**
 * 咖啡仓库信息Service业务层处理
 *
 * @author Lin
 * @date 2024-02-13
 */
@Service
public class CoffeeWarehouseServiceImpl implements ICoffeeWarehouseService
{
    @Autowired
    private CoffeeWarehouseMapper coffeeWarehouseMapper;

    /**
     * 查询咖啡仓库信息
     *
     * @param warehouseId 咖啡仓库信息主键
     * @return 咖啡仓库信息
     */
    @Override
    public CoffeeWarehouse selectCoffeeWarehouseByWarehouseId(Long warehouseId)
    {
        return coffeeWarehouseMapper.selectCoffeeWarehouseByWarehouseId(warehouseId);
    }

    /**
     * 查询咖啡仓库信息列表
     *
     * @param coffeeWarehouse 咖啡仓库信息
     * @return 咖啡仓库信息
     */
    @Override
    public List<CoffeeWarehouse> selectCoffeeWarehouseList(CoffeeWarehouse coffeeWarehouse)
    {
        return coffeeWarehouseMapper.selectCoffeeWarehouseList(coffeeWarehouse);
    }

    /**
     * 新增咖啡仓库信息
     *
     * @param coffeeWarehouse 咖啡仓库信息
     * @return 结果
     */
    @Override
    public int insertCoffeeWarehouse(CoffeeWarehouse coffeeWarehouse)
    {
        return coffeeWarehouseMapper.insertCoffeeWarehouse(coffeeWarehouse);
    }

    /**
     * 修改咖啡仓库信息
     *
     * @param coffeeWarehouse 咖啡仓库信息
     * @return 结果
     */
    @Override
    public int updateCoffeeWarehouse(CoffeeWarehouse coffeeWarehouse)
    {
        return coffeeWarehouseMapper.updateCoffeeWarehouse(coffeeWarehouse);
    }

    /**
     * 批量删除咖啡仓库信息
     *
     * @param warehouseIds 需要删除的咖啡仓库信息主键
     * @return 结果
     */
    @Override
    public int deleteCoffeeWarehouseByWarehouseIds(Long[] warehouseIds)
    {
        return coffeeWarehouseMapper.deleteCoffeeWarehouseByWarehouseIds(warehouseIds);
    }

    /**
     * 删除咖啡仓库信息信息
     *
     * @param warehouseId 咖啡仓库信息主键
     * @return 结果
     */
    @Override
    public int deleteCoffeeWarehouseByWarehouseId(Long warehouseId)
    {
        return coffeeWarehouseMapper.deleteCoffeeWarehouseByWarehouseId(warehouseId);
    }
}
